#ifndef _VN_TEMP_VISUAL_COMPONENT_H_
#define _VN_TEMP_VISUAL_COMPONENT_H_

#include "..\Graphics\Sprite.h"
#include "IComponent.h"
#include "..\Managers\AnimationManager.h"

class TempVisualComponent : public IComponent
{
public:
	TempVisualComponent(unsigned int p_view, const std::string& p_stringID, const std::string& p_filepath, float p_layer = 1.0f, bool p_updatePosition = false);
	virtual ~TempVisualComponent(void);

	virtual const std::string getType() { return "TempVisualComponent"; }
	virtual const std::string getFamilyType() { return "TempVisualComponent"; }

	virtual void update(const GameTime& p_gameTime);
	virtual void init();
	virtual void setPosition(const vn::Vector2& p_position)		{ m_sprite->setPosition(p_position); }
	virtual void setPosition(float p_x, float p_y)				{ m_sprite->setPosition(p_x, p_y); }
	void updatePosition();
	vn::Sprite* getSprite() { return m_sprite; }

protected:
	bool m_updatePosition;
	vn::Sprite* m_sprite;
	vn::AnimationManager* m_animation;
};

#endif // _VN_TEMP_VISUAL_COMPONENT_H_